package com.weasel.weixin.mp;

import com.weasel.weixin.commons.AccessTokenRequest;
import com.weasel.weixin.mp.builder.MpConfigBuilder;
import com.weasel.weixin.mp.config.MpConfig;

import java.io.IOException;
import java.util.concurrent.ExecutionException;

/**accessToken测试
 * 运行main方法来测试各方法
 * Created by Dylan on 2015/9/28.
 */
public class AccessTokenDemo {

    public  static void main(String [] agrs) throws IOException {

        MpConfig config = MpConfigBuilder.fromXML("classpath:weixin-config.xml");
        try {
            String accessToken = new AccessTokenRequest(config).getAccessToken();
            System.out.print(accessToken);
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
    }
}
